executable/resource

linked against Go static asset library

rule:
  meta:
    name: linked against Go static asset library
    namespace: executable/resource
    authors:
      - joakim@intezer.com
    description: Detects if the Go file includes an static assets.
    scopes:
      static: file
      dynamic: file
    references:
      - https://github.com/rakyll/statik
      - https://github.com/gobuffalo/packr
      - https://github.com/gobuffalo/packr
      - https://github.com/GeertJohan/go.rice
      - https://github.com/kevinburke/go-bindata
      - https://github.com/lu4p/binclude
      - https://github.com/lu4p/binclude
      - https://github.com/omeid/go-resources
      - https://github.com/pyros2097/go-embed
  features:
    - and:
      - match: compiled with Go
      - or:
        - or:
          - string: "github.com/rakyll/statik/fs.IsDefaultNamespace"
          - string: "github.com/rakyll/statik/fs.RegisterWithNamespace"
          - string: "github.com/rakyll/statik/fs.NewWithNamespace"
          - string: "github.com/rakyll/statik/fs.Register"
        - and:
          - string: "github.com/gobuffalo/packr.NewBox"
        - or:
          - string: "github.com/markbates/pkger.Open"
          - string: "github.com/markbates/pkger.Include"
          - string: "github.com/markbates/pkger.Parse"
        - or:
          - string: "github.com/GeertJohan/go.rice.FindBox"
          - string: "github.com/GeertJohan/go.rice.MustFindBox"
        - and:
          - substring: "/bindata.go"
            description: go-bindata
          - substring: ".Asset"
        - and:
          - string: "github.com/lu4p/binclude.Include"
        - and:
          - string: "github.com/omeid/go-resources"
        - and:
          - string: "github.com/pyros2097/go-embed"

last edited: 2023-11-24 10:34:28